import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import EmpLeft from '../views/emp/empleft.vue'
import EmpMain from '../views/emp/empmain.vue'
import CarLeft from '../views/car/carleft.vue'
import CarMain from '../views/car/carmain.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    components: {
      default: HomeView,
      aside:  () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
  },
  {
    path: '/emp',
    name: 'emp',
    components: {
      default: EmpMain,
      aside: EmpLeft
    }
  },
  {
    path: '/carinfo',
    name: 'carinfo',
    components: {
      default: CarMain,
      aside: CarLeft
    }
  },
  
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
